<?php
	// set up database info
	$usr = "appkudos";
	$pwd = "ak1234";
	$db = "appkudos";
	$host = "yangjustine.startlogicmysql.com";

	// establish connection
	$connection = mysql_connect($host,$usr,$pwd);
	if (!$connection) { echo("ERROR: " . mysql_error() . "\n"); }
	
	// get one user
	$username = $_REQUEST['username'];
	//$username = "tiffany";
	$sql = 'SELECT * FROM `User` WHERE `username` = \''.$username.'\'';
	
	$users = mysql_db_query($db,"$sql",$connection);

	if (!$users) {
    		echo("ERROR: " . mysql_error() . "\n$SQL\n"); 	
	}
	else{
		$user = mysql_fetch_array($users);
		print(json_encode($user)); 
	}

	mysql_close($connection);

?>